/**
 * ===========================================================================
 * 版权所有 湖南免了么网络科技有限公司，并保留所有权利。
 * 网站地址: http://www.mianle.me
 * ===========================================================================
 * 10:39 2018/7/12
 */
package com.mianle.userapi.service.cglib;

import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: yiyuan
 * @Description:
 * @Date: Created in 10:39 2018/7/12
 *
 */
public class DynamicGenerateBeanTest {

    @SuppressWarnings({ "unused", "rawtypes" })
    @Test
    public void test(){

        Map<String, Class> propertyMap=new HashMap<String, Class>();
        propertyMap.put("id", Integer.class);
        propertyMap.put("name", String.class);
        //propertyMap.put("",int.class);
        DynamicGenerateBean dynamicGenerateBean=new DynamicGenerateBean(propertyMap);
        dynamicGenerateBean.setPropertyByName("id", 1);
        dynamicGenerateBean.setPropertyByName("name", "lirongqiang");
        System.out.println(dynamicGenerateBean.getPropertyByName("id"));
        System.out.println(dynamicGenerateBean.getPropertyByName("name"));
        //System.out.println(dynamicGenerateBean.getPropertyByName("id"));
    }
}
